class NumArray:

    def sumRange(self,nums,i, j):
        """
        :type nums: List[int]
        """
        f = [0] * (len(nums) + 1)
        for i in range(1, len(nums)+1):
            f[i] = f[i - 1] + nums[i - 1]
        print(f)
        # return self.f[j + 1] - self.f[i]

n=NumArray()
m =n.sumRange([-2,0,3,-5,2,-1],0,2)
print(m)